﻿using System;
using System.Collections.Generic;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Shapes;

namespace WPF基础.控件
{
    /// <summary>
    /// A18_ListBox.xaml 的交互逻辑
    /// </summary>
    public partial class A18_ListBox : Window
    {
        public A18_ListBox()
        {
            InitializeComponent();
        }

        private void Window_Loaded(object sender, RoutedEventArgs e)
        {
            List<string> list = new List<string>();
            list.Add("ListBox_Item_1");
            list.Add("ListBox_Item_2");
            list.Add("ListBox_Item_3");
            list.Add("ListBox_Item_4");

            this.Box_1.DataContext= list;
        }
    }
}
